package com.tarena.demo.luban.all.main.mapper;

import com.tarena.demo.luban.protocol.stock.dos.StockDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface StockMapper {

    @Update("update stock_tbl set stock=stock-#{stock} where product_code=#{productCode} and stock>=#{stock}")
    int update(StockDO stockDO);
}
